package com.liuf.quartz.common;

import com.alibaba.fastjson.JSON;

/**
 * @program: spring-cloud-liuf-master
 * @description: Response bean for format response
 * @author: Mr.Liu
 * @create: 2018-08-30 13:26
 * @码云： https://gitee.com/www.jiandan.com
 **/
public class CommonResponse {

    private int code;

    private String message;

    private Object data;

    public int getCode() {
        return code;
    }

    public CommonResponse setCode(ResponseCode responseCode) {
        this.code = responseCode.code;
        return this;
    }

    public String getMessage() {
        return message;
    }

    public CommonResponse setMessage(String message) {
        this.message = message;
        return this;
    }

    public Object getData() {
        return data;
    }

    public CommonResponse setData(Object data) {
        this.data = data;
        return this;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
